package com.healthy.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.education.mapper.CourseCategoriesMapper;
import com.healthy.education.domain.CourseCategories;
import com.healthy.education.service.ICourseCategoriesService;

/**
 * 课程类别Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class CourseCategoriesServiceImpl implements ICourseCategoriesService 
{
    @Autowired
    private CourseCategoriesMapper courseCategoriesMapper;

    /**
     * 查询课程类别
     * 
     * @param id 课程类别主键
     * @return 课程类别
     */
    @Override
    public CourseCategories selectCourseCategoriesById(Long id)
    {
        return courseCategoriesMapper.selectCourseCategoriesById(id);
    }

    /**
     * 查询课程类别列表
     * 
     * @param courseCategories 课程类别
     * @return 课程类别
     */
    @Override
    public List<CourseCategories> selectCourseCategoriesList(CourseCategories courseCategories)
    {
        return courseCategoriesMapper.selectCourseCategoriesList(courseCategories);
    }

    /**
     * 新增课程类别
     * 
     * @param courseCategories 课程类别
     * @return 结果
     */
    @Override
    public int insertCourseCategories(CourseCategories courseCategories)
    {
        return courseCategoriesMapper.insertCourseCategories(courseCategories);
    }

    /**
     * 修改课程类别
     * 
     * @param courseCategories 课程类别
     * @return 结果
     */
    @Override
    public int updateCourseCategories(CourseCategories courseCategories)
    {
        return courseCategoriesMapper.updateCourseCategories(courseCategories);
    }

    /**
     * 批量删除课程类别
     * 
     * @param ids 需要删除的课程类别主键
     * @return 结果
     */
    @Override
    public int deleteCourseCategoriesByIds(Long[] ids)
    {
        return courseCategoriesMapper.deleteCourseCategoriesByIds(ids);
    }

    /**
     * 删除课程类别信息
     * 
     * @param id 课程类别主键
     * @return 结果
     */
    @Override
    public int deleteCourseCategoriesById(Long id)
    {
        return courseCategoriesMapper.deleteCourseCategoriesById(id);
    }
}
